﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace EventBus.Abstractions
{
    public interface IEventPublisher
        :IDisposable
    {
        Task PublishAsync<T>(T @event,CancellationToken cancellationToken= default(CancellationToken))
            where T : IEvent;
    }
}
